
#ifndef _CDS_LES_H_
#define _CDS_LES_H_

#include "Equations/ScalarEquation.hpp"

namespace Tuna {

  template <typename T, int Dim> class CDS_LES;

  template <typename T>
  struct Typeinfo <CDS_LES<T, 1> > {
    typedef T prec_t;
    enum { Dim = 1 };
  };

  template <typename T>
  struct Typeinfo <CDS_LES<T, 2> > {
    typedef T prec_t;
    enum { Dim = 2 };
  };

  template <typename T>
  struct Typeinfo <CDS_LES<T, 3> > {
    typedef T prec_t;
    enum { Dim = 3 };
  };

/*! 
 ***************************************************************************
 * Adaptor for central differences for energy equation.
 ***************************************************************************
 *  \author  Luis M. de la Cruz [ Mon Mar 17 19:55:58 GMT 2008 ]
 ***************************************************************************
 */

template<typename Tprec, int Dim>
class CDS_LES : public ScalarEquation< CDS_LES< Tprec, Dim > >
{
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aE;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aW;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aN;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aS;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aF;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aB;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::aP;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::sp;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::dx;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::dy;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::dz;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::bi;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::ei;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::bj;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::ej;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::bk;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::ek;
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::dt;    
    using GeneralEquation<ScalarEquation<CDS_LES<Tprec, Dim > > >::applyBoundaryConditions3D;
       
    using ScalarEquation<CDS_LES<Tprec, Dim > >::Gamma;
    using ScalarEquation<CDS_LES<Tprec, Dim> >::phi_0;
    using ScalarEquation<CDS_LES<Tprec, Dim> >::u;
    using ScalarEquation<CDS_LES<Tprec, Dim> >::v;
    using ScalarEquation<CDS_LES<Tprec, Dim> >::w;

  //    using GeneralEquation< Tprec, Dim>::PrandtlTurbulent;

public:
  typedef Tprec prec_t;
  typedef typename TunaArray<prec_t, Dim >::huge ScalarField;

  CDS_LES() : ScalarEquation<CDS_LES<prec_t, Dim> >() { }
  ~CDS_LES() { }; 

  /*!
   * FVM coefficients calculations for the case of turbulent flow
   * Here the turbulent viscosity is required as a parameter for
   * the adaptors.
   */
  inline bool calcCoefficients(const ScalarField &nut);

  inline void printInfo() { std::cout << " CDS_LES "; }
};

} // Tuna namespace

#include "../../../src/LES/Schemes/CDS_LES.cpp"

#endif //_CDS_LES_H_

















